package com.chapter.sample.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAdvice3 implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("环绕通知 前 。。");
        //执行目标方法
        Object invoke = methodInvocation.getMethod()
                .invoke(methodInvocation.getThis(), methodInvocation.getArguments());
        System.out.println("环绕通知 后 。。");
        return null;
    }
}
